export function errorListCol() {
  const vm = this;
  const COLUMN_WIDTH = window.RPConfig.COLUMN_WIDTH
  return [
    {
      title: vm.$t('module.errCenter.applyName'),
      key: "appName",
      minWidth: 100,
    },
    {
      title: vm.$t('module.errCenter.errorCode'),
      key: "errorCode",
      minWidth: 100,
    },
    {
      title: vm.$t('module.errCenter.errorMessage'),
      key: "message",
      minWidth: 100,
    },
    {
      title: vm.$t('module.errCenter.type'),
      key: "type",
      align: "center",
      minWidth: COLUMN_WIDTH.COLUMN_WIDTH_2_WORDS,
      maxWidth: COLUMN_WIDTH.COLUMN_WIDTH_2_WORDS + COLUMN_WIDTH.MAX_WIDTH_MORE,

    },
    {
      title: vm.$t('module.errCenter.describe'),
      key: "description",
      minWidth: 140,
    },
    {
      title: vm.$t("common.operating"),
      align: "left",
      fixed: "right",
      width: 100,
      render: (h, { row }) => {
        return h("RowTools", {
          props: {
            data: [
              {
                type: "icon",
                icon: "md-create",
                text: this.$t("common.edit"),
                handle: () => vm.addHandler(row)
              },
              {
                type: "icon",
                icon: "ios-trash",
                text: vm.$t("common.delete"),
                handle: () => vm.deleteHandler(row.id)
              }
            ]
          }
        });
      }
    }
  ];
}
